From: Florian Müllner Date: Thu, 22 Sep 2011 13:33:43 +0000 (+0200) Subject: popup-menu: Fix allocation in RTL locales X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7572 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5f6dce2b5ca7ef07c6c6b43020390f2a6143c53e;p=gnome-shell.git popup-menu: Fix allocation in RTL locales Commit ed7d4928e5 fixed some width-for-height cases in popup menu items, but did not consider RTL locales. Fix this. https://bugzilla.gnome.org/show_bug.cgi?id=659827 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 53ddc9712..3ee3c1770 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -320,10 +320,14 @@ PopupBaseMenuItem.prototype = { } extraWidth = availWidth - naturalWidth; } else { - if (child.span == -1) - availWidth = box.x2 - x; - else + if (child.span == -1) { + if (direction == St.TextDirection.LTR) + availWidth = box.x2 - x; + else + availWidth = x - box.x1; + } else { availWidth = naturalWidth; + } extraWidth = 0; }